/**  
 * All rights Reserved, Designed By www.beonelot.com
 * @Package: com.bccah.modlib.dbdo.service.impl
 * @Filename: AcsControlUserMethodServiceImpl.java
 * @Description: TODO(AcsControlUserMethodService接口实现)
 * @author: 金鑫智慧
 * @date: 2020-04-08
 * @version: V1.0
 * @Copyright: 2018 www.beonelot.com Inc. All rights reserved.
 * 注意：本内容仅限于重庆金鑫智慧科技有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
package com.jinxin.platform.cdfaceacs.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jinxin.platform.cdfaceacs.mapper.JurenAcsControlUserMethodMapper;
import com.jinxin.platform.cdfaceacs.pojo.domains.AcsControlUserMethodDO;
import com.jinxin.platform.cdfaceacs.service.AcsControlUserMethodService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * TODO(AcsControlUserMethodService接口实现)
 * @Classn: AcsControlUserMethodServiceImpl
 * @author SY
 * @date 2020-04-08
 */
@Service
public class AcsControlUserMethodServiceImpl  implements AcsControlUserMethodService {

    @Resource
    JurenAcsControlUserMethodMapper methodMapper;

    @Override
    public PageInfo<AcsControlUserMethodDO> selParamPage(int page, int size, String blockName) {
        PageHelper.startPage(page,size);//这行是重点，表示从pageNum页开始，每页pageSize条数据
        List<AcsControlUserMethodDO> list = methodMapper.selAllTable(blockName );
        PageInfo<AcsControlUserMethodDO> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public int saveDO(AcsControlUserMethodDO paramDO) {
        return methodMapper.insert(paramDO);
    }

    @Override
    public int updateDO(AcsControlUserMethodDO paramDO) {
        return methodMapper.updateByPrimaryKeySelective(paramDO);
    }

    @Override
    public int delDO(String pid) {
        return methodMapper.deleteByPrimaryKey(pid);
    }

    @Override
    public List<AcsControlUserMethodDO> selDOByInfo(AcsControlUserMethodDO paramDO) {
        return methodMapper.selDOByInfo(paramDO );
    }
}
